package homework6;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * @classname:Account
 * @description:
 * @author: Mr.Z
 * @date: 2020/12/14 19:45
 * @version: 0.1
 * @since:1.8
 */
@Setter
@Getter
@ToString
public class Account {
    private long id;
    private double balance;
    private String password;
    private static int idCount = 0;

    public Account(long id, double balance, String password) {
        this.id = id;
        this.balance = balance;
        this.password = password;
    }

    public Account(double balance, String password) {
        this.balance = balance;
        this.password = password;
        this.id = ++idCount;
    }

    public Account() {
        this.id = ++idCount;
    }
}
